package com.aigou.admin.service.impl;

import com.aigou.admin.dao.OrderProductDao;
import com.aigou.admin.dao.impl.OrderProductDaoImpl;
import com.aigou.admin.entity.OrderProduct;
import com.aigou.admin.service.OrderProductService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * @Author: xsc_hunter
 * @Date: 2024/12/4) 下午2:35
 * @Version: 1.0
 */

@Service
@AllArgsConstructor
public class OrderProductServiceImpl implements OrderProductService {

    private OrderProductDao orderProductDao;
    @Override
    public List<OrderProduct> findAll() {
        return orderProductDao.selectAll();
    }

    @Override
    public OrderProduct findById(String id) {
        return orderProductDao.selectById(id);
    }

    @Override
    public Boolean save(OrderProduct orderProduct) {
        return orderProductDao.insert(orderProduct);
    }

    @Override
    public Boolean update(OrderProduct orderProduct) {
        return orderProductDao.update(orderProduct);
    }

    @Override
    public Boolean remove(String id) {
        return orderProductDao.delete(id);
    }
}
